package com.cleaningcloud.cld.domain;

import com.cleaningcloud.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.cleaningcloud.common.core.annotation.Excel;

import java.math.BigDecimal;

/**
 * 资产信息对象 cld_assets
 * 
 * @author cleaningcloud
 * @date 2024-10-06
 */
public class CldAssets extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 资产类型ID */
    private Long assetsId;

    /** 资产类型(字典表cld_assets_type) */
    @Excel(name = "资产类型(字典表cld_assets_type)")
    private Long assetsType;

    /** 资产编号 */
    @Excel(name = "资产编号")
    private String assetsNo;

    /** 资产名称 */
    @Excel(name = "资产名称")
    private String assetsName;

    /** 资产图片 */
    @Excel(name = "资产图片")
    private String assetsImg;

    /** 资产型号 */
    @Excel(name = "资产型号")
    private String assetsModel;

    /** 资产单位 */
    @Excel(name = "资产单位")
    private String assetsUnit;

    /** 资产品牌 */
    @Excel(name = "资产品牌")
    private String assetsBrand;

    /** 折旧期数 */
    @Excel(name = "折旧期数")
    private Long assetsPeriodNumber;

    /** 创建人ID */
    @Excel(name = "创建人ID")
    private Long createId;

    /** 创建人名称 */
    @Excel(name = "创建人名称")
    private String createName;

    /** 备注是否关闭 */
    @Excel(name = "备注是否关闭")
    private Long flag;

    @Excel(name = "购置单价")
    private BigDecimal bulMoney;


    /**
     * 总数量
     */
    private Integer assetsTotalNum;

    private BigDecimal bulTotalMoney;

    public BigDecimal getBulTotalMoney() {
        return new BigDecimal(assetsTotalNum==null?0:assetsTotalNum).multiply(bulMoney==null?new BigDecimal(0):bulMoney);
    }

    public void setBulTotalMoney(BigDecimal bulTotalMoney) {
        this.bulTotalMoney = bulTotalMoney;
    }

    public Integer getAssetsTotalNum() {
        return assetsTotalNum;
    }

    public void setAssetsTotalNum(Integer assetsTotalNum) {
        this.assetsTotalNum = assetsTotalNum;
    }

    public BigDecimal getBulMoney() {
        return bulMoney;
    }

    public void setBulMoney(BigDecimal bulMoney) {
        this.bulMoney = bulMoney;
    }

    public void setAssetsId(Long assetsId)
    {
        this.assetsId = assetsId;
    }

    public Long getAssetsId() 
    {
        return assetsId;
    }
    public void setAssetsType(Long assetsType) 
    {
        this.assetsType = assetsType;
    }

    public Long getAssetsType() 
    {
        return assetsType;
    }
    public void setAssetsNo(String assetsNo) 
    {
        this.assetsNo = assetsNo;
    }

    public String getAssetsNo() 
    {
        return assetsNo;
    }
    public void setAssetsName(String assetsName) 
    {
        this.assetsName = assetsName;
    }

    public String getAssetsName() 
    {
        return assetsName;
    }
    public void setAssetsImg(String assetsImg) 
    {
        this.assetsImg = assetsImg;
    }

    public String getAssetsImg() 
    {
        return assetsImg;
    }
    public void setAssetsModel(String assetsModel) 
    {
        this.assetsModel = assetsModel;
    }

    public String getAssetsModel() 
    {
        return assetsModel;
    }
    public void setAssetsUnit(String assetsUnit) 
    {
        this.assetsUnit = assetsUnit;
    }

    public String getAssetsUnit() 
    {
        return assetsUnit;
    }
    public void setAssetsBrand(String assetsBrand) 
    {
        this.assetsBrand = assetsBrand;
    }

    public String getAssetsBrand() 
    {
        return assetsBrand;
    }
    public void setAssetsPeriodNumber(Long assetsPeriodNumber) 
    {
        this.assetsPeriodNumber = assetsPeriodNumber;
    }

    public Long getAssetsPeriodNumber() 
    {
        return assetsPeriodNumber;
    }
    public void setCreateId(Long createId) 
    {
        this.createId = createId;
    }

    public Long getCreateId() 
    {
        return createId;
    }
    public void setCreateName(String createName) 
    {
        this.createName = createName;
    }

    public String getCreateName() 
    {
        return createName;
    }
    public void setFlag(Long flag) 
    {
        this.flag = flag;
    }

    public Long getFlag() 
    {
        return flag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("assetsId", getAssetsId())
            .append("assetsType", getAssetsType())
            .append("assetsNo", getAssetsNo())
            .append("assetsName", getAssetsName())
            .append("assetsImg", getAssetsImg())
            .append("assetsModel", getAssetsModel())
            .append("assetsUnit", getAssetsUnit())
            .append("assetsBrand", getAssetsBrand())
            .append("assetsPeriodNumber", getAssetsPeriodNumber())
            .append("createId", getCreateId())
            .append("createName", getCreateName())
            .append("createTime", getCreateTime())
            .append("flag", getFlag())
            .toString();
    }
}
